import request from '@/utils/request.js'

// 获取操作日志列表
export const getOperationLogListService = (params) => {
    return request.get('/log/operation', { params })
}

// 获取登录日志列表
export const getLoginLogListService = (params) => {
    return request.get('/log/login', { params })
}

// 导出操作日志
export const exportOperationLogService = (params) => {
    return request.get('/log/operation/export', { 
        params,
        responseType: 'blob'
    })
}

// 导出登录日志
export const exportLoginLogService = (params) => {
    return request.get('/log/login/export', { 
        params,
        responseType: 'blob'
    })
}

// 清理指定天数前的日志
export const cleanLogService = (days, type) => {
    return request.delete(`/log/clean/${type}/${days}`)
} 